﻿using System;

namespace ZH.GPT.Infrastructures.Entities
{
    /// <summary>
    /// 消息
    /// </summary>
    public class ChatMessage
    {
        /// <summary>
        /// 消息id
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 用户id
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 消息体id
        /// </summary>
        public string ChatId { get; set; }
        /// <summary>
        /// 消息内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public Int64 Sort { get; set; }
        /// <summary>
        /// 消息类型
        /// </summary>
        public MessageRole Role { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedTime { get; set; }
    }

    /// <summary>
    /// 消息类型
    /// </summary>
    public enum MessageRole
    {
        /// <summary>
        /// chatgpt的角色
        /// </summary>
        System = 1,
        /// <summary>
        /// 发送给chatgpt的
        /// </summary>
        User = 2,
        /// <summary>
        /// chatgpt的回复
        /// </summary>
        Assistant = 3,
    }
}
